use crate::{math::{Vector3f, Vector2f, Matrix4f} , color::Rgba , pool::Handle , function::resource::texture::Texture};


/// 2d 绘制命令
#[derive(Debug)]
pub enum Canvas2dCommand {
    /// 根据 position(2d), size ， texture ，factory，color 来生成 Quad
    QuadWithPSF(PSF),
    /// 根据 position(3d), size ， texture ，factory，color 来生成 Quad
    QuadWithPST(PST),
    /// 根据 transform ，color 来生成 Quad
    QuadWithTC(TC),
    /// 根据 transform ， texture ，factory，color 来生成 Quad
    QuadWithTFC(TFC),
}

#[derive(Debug)]
pub struct PSF {
    pub position: Vector2f,
    pub size: Vector2f,
    pub texture: Handle<Texture>,
    pub factory: f32,
    pub color: Rgba,
}


#[derive(Debug)]
pub struct PST {
    pub position: Vector3f,
    pub size: Vector2f,
    pub texture: Handle<Texture>,
    pub factory: f32,
    pub color: Rgba,
}
#[derive(Debug)]
pub struct TC {
    pub transform: Matrix4f,
    pub color: Rgba
}
#[derive(Debug)]
pub struct TFC {
    pub transform: Matrix4f,
    pub texture: Handle<Texture>,
    pub factory: f32,
    pub color: Rgba,
}